<template>
  <div class="wall-home">
    <top-bar></top-bar>
    <video src="@/assets/images/qm1.mp4" loop="loop" autoplay="autoplay" muted="muted" class="bg-video"></video>
    <router-view></router-view>
    <footer-bar></footer-bar>
  </div>
</template>

<script setup>
import topBar from "@/components/TopBar.vue";
import footerBar from "@/components/FooterVue.vue";
import { signIpApi } from "@/api/index";
import { onMounted } from "vue";

import { useStore } from "vuex";
const store = useStore()

const getUser = () => {
  signIpApi().then(res => {
    // console.log(res)
    let user = {
      id: res.ip
    }
    store.commit('getUser', user)
  })
}

onMounted(() => {
  getUser()
})
</script>

<style lang="less" scoped>
.wall-home {
  .bg-video {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    height: 800px;
  }
}
</style>
